package com.nars.date;

import java.util.Calendar;
import java.util.Date;

public class Calendar2 {

	public static void main(String[] args) {

		/*
		 * GregorianCalendar calendar = new GregorianCalendar();
		 * System.out.println(calendar.toString());
		 */

		Calendar calendar = Calendar.getInstance();
		System.out.println(calendar.toString());
		System.out.println(calendar.getTime());
		calendar.set(Calendar.MONTH, 1);
		System.out.println(calendar.getTime());
		System.out.println(new Date());
		System.out.println(calendar.get(Calendar.DAY_OF_MONTH));
		System.out.println(calendar.get(Calendar.DAY_OF_WEEK_IN_MONTH));
	}
}

